import request from '@/utils/request'

// 查询订单产品列表
export function listOrderProduct(query) {
  return request({
    url: '/order/orderProduct/list',
    method: 'get',
    params: query
  })
}

// 查询订单产品详细
export function getOrderProduct(orderId) {
  return request({
    url: '/order/orderProduct/' + orderId,
    method: 'get'
  })
}

// 新增订单产品
export function addOrderProduct(data) {
  return request({
    url: '/order/orderProduct',
    method: 'post',
    data: data
  })
}

// 修改订单产品
export function updateOrderProduct(data) {
  return request({
    url: '/order/orderProduct',
    method: 'put',
    data: data
  })
}

// 删除订单产品
export function delOrderProduct(orderId) {
  return request({
    url: '/order/orderProduct/' + orderId,
    method: 'delete'
  })
}

// 导出订单产品
export function exportOrderProduct(query) {
  return request({
    url: '/order/orderProduct/export',
    method: 'get',
    params: query
  })
}